;Open Cities Reborn BAIN Wizard Installation Script by Arthmoor
RequireVersions '1.2.0.416','0.0.20.6','','292'

ResetAllEspmNames
DeSelectAll

SelectSubPackage '00 Core'

SelectOne "Would you like to install the open versions of the Imperial Prison and Arcane University?", \
    "|Yes", "Installs open versions of the Imperial Prison and Arcane University.", "_Screenshots\\ImperialPrison.jpg", \
    "No", "The Imperial Prison and Arcane University will remain closed districts.", "_Screenshots\\ImperialPrison.jpg"
        Case 'Yes'
            SelectSubPackage '10 Outer Districts'
        Break
        Case 'No'
        Break
EndSelect

If DataFileExists('Blood&Mud.esp')
    SelectOne "Ryan's Bravil Blood & Mud detected. Do you want to install the OCR additions for Bravil?", \
        "|Yes", "Installs the OCR additions for Ryan's Bravil Blood & Mud", "_Screenshots\\Bravil.jpg", \
        "No", "Do not install the Blood & Mud Additions.", "_Screenshots\\Bravil.jpg"
            Case 'Yes'
                SelectSubPackage '01 Blood & Mud Additions'
            Break
            Case 'No'
            Break
    EndSelect
EndIf

If DataFileExists('DLCShiveringIsles.esp')
    SelectOne "Shivering Isles detected. Would you like New Sheoth to be installed as an open city?", \
        "|Yes", "Installs the open version of New Sheoth for Shivering Isles.", "_Screenshots\\NewSheoth.jpg", \
        "No", "New Sheoth will remain as a closed city.", "_Screenshots\\NewSheoth.jpg"
            Case 'Yes'
                SelectSubPackage '20 New Sheoth'
            Break
            Case 'No'
            Break
    EndSelect
EndIf

If DataFileExists('bartholm.esp')
    SelectOne "J. Sera's Bartholm has been detected. Would you like to install an open version of this city?", \
        "|Yes", "Installs the open version of J. Sera's Bartholm.", "_Screenshots\\Bartholm.jpg", \
        "No", "J. Sera's Bartholm will remain as a closed city.", "_Screenshots\\Bartholm.jpg"
            Case 'Yes'
                SelectSubPackage '30 Bartholm'
            Break
            Case 'No'
            Break
    EndSelect
EndIf

LODString = "40 LOD Compatibility - Anvil Reborn"

SelectMany "Landscape LOD Compatibility: Anvil. Select any mods you have that need LOD compatibility.", \
    "Castle Seaview", "Castle Seaview", "_Screenshots\\Anvil.jpg", \
    "UL: Lost Coast", "UL: Lost Coast", "_Screenshots\\Anvil.jpg", \
    "UL: Cliffs of Anvil", "UL: Cliffs of Anvil", "_Screenshots\\Anvil.jpg"
        Case 'Castle Seaview'
            LODString = LODString + " + Castle Seaview"
        Break
        Case 'UL: Lost Coast'
            LODString = LODString + " + UL Lost Coast"
        Break
        Case 'UL: Cliffs of Anvil'
            LODString = LODString + " + UL Cliffs of Anvil"
        Break
EndSelect

If LODString != "40 LOD Compatibility - Anvil Reborn"
    SelectSubPackage LODString
EndIf

LODString = "50 LOD Compatibility - Cheydinhal Reborn"

SelectMany "Landscape LOD Compatibility: Cheydinhal. Select any mods you have that need LOD compatibility.", \
    "UL: Arrius Creek", "UL: Arrius Creek", "_Screenshots\\Cheydinhal.jpg", \
    "UL: Rolling Hills", "UL: Rolling Hills", "_Screenshots\\Cheydinhal.jpg", \
    "UL: Cheydinhal Falls", "UL: Cheydinhal Falls", "_Screenshots\\Cheydinhal.jpg"
        Case 'UL: Arrius Creek'
            LODString = LODString + " + UL Arrius Creek"
        Break
        Case 'UL: Cheydinhal Falls'
            LODString = LODString + " + UL Cheydinhal Falls"
        Break
        Case 'UL: Rolling Hills'
            LODString = LODString + " + UL Rolling Hills"
        Break
EndSelect

If LODString != "50 LOD Compatibility - Cheydinhal Reborn"
    SelectSubPackage LODString
EndIf

Finish